package com.sims.action.manager;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Student;
import com.sims.service.ManagerService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

@SuppressWarnings("serial")
public class addStudentAction extends ActionEnhanced{
	Student student;

	@Autowired
	ManagerService managerService;
	
	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Override
	public String execute() {
		result = managerService.addStudent(student);
		if (result.containsKey(Constant.SUCCESS))
			return SUCCESS;
		return ERROR;
	}
}
